/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn.webrx.controller;

import cn.webrx.config.SpringConfig;
import org.springframework.core.SpringVersion;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

/**
 * <p>Project: smvc2022 - IndexController
 * <p>Powered by webrx On 2022-04-08 17:46:57
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
@RestController
public class IndexController {
    @RequestMapping
    public String index(){
        return String.format("Hello 中文效果 Spring %s", SpringVersion.getVersion());
    }


    @RequestMapping("/home")
    public ModelAndView home(ModelAndView mv){
        mv.setViewName("index");
        mv.addObject("msg","框架整合");
        return mv;
    }
}
